package com.ruoyi.functiontest.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.functiontest.mapper.RoadSectionDistanceTestMapper;
import com.ruoyi.functiontest.domain.RoadSectionDistanceTest;
import com.ruoyi.functiontest.service.IRoadSectionDistanceTestService;

/**
 * 主线站点间里程实测数据测试Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-25
 */
@Service
public class RoadSectionDistanceTestServiceImpl implements IRoadSectionDistanceTestService 
{
    @Autowired
    private RoadSectionDistanceTestMapper roadSectionDistanceTestMapper;

    /**
     * 查询主线站点间里程实测数据测试
     * 
     * @param id 主线站点间里程实测数据测试主键
     * @return 主线站点间里程实测数据测试
     */
    @Override
    public RoadSectionDistanceTest selectRoadSectionDistanceTestById(Long id)
    {
        return roadSectionDistanceTestMapper.selectRoadSectionDistanceTestById(id);
    }

    /**
     * 查询主线站点间里程实测数据测试列表
     * 
     * @param roadSectionDistanceTest 主线站点间里程实测数据测试
     * @return 主线站点间里程实测数据测试
     */
    @Override
    public List<RoadSectionDistanceTest> selectRoadSectionDistanceTestList(RoadSectionDistanceTest roadSectionDistanceTest)
    {
        return roadSectionDistanceTestMapper.selectRoadSectionDistanceTestList(roadSectionDistanceTest);
    }

    /**
     * 新增主线站点间里程实测数据测试
     * 
     * @param roadSectionDistanceTest 主线站点间里程实测数据测试
     * @return 结果
     */
    @Override
    public int insertRoadSectionDistanceTest(RoadSectionDistanceTest roadSectionDistanceTest)
    {
        return roadSectionDistanceTestMapper.insertRoadSectionDistanceTest(roadSectionDistanceTest);
    }

    /**
     * 修改主线站点间里程实测数据测试
     * 
     * @param roadSectionDistanceTest 主线站点间里程实测数据测试
     * @return 结果
     */
    @Override
    public int updateRoadSectionDistanceTest(RoadSectionDistanceTest roadSectionDistanceTest)
    {
        return roadSectionDistanceTestMapper.updateRoadSectionDistanceTest(roadSectionDistanceTest);
    }

    /**
     * 批量删除主线站点间里程实测数据测试
     * 
     * @param ids 需要删除的主线站点间里程实测数据测试主键
     * @return 结果
     */
    @Override
    public int deleteRoadSectionDistanceTestByIds(Long[] ids)
    {
        return roadSectionDistanceTestMapper.deleteRoadSectionDistanceTestByIds(ids);
    }

    /**
     * 删除主线站点间里程实测数据测试信息
     * 
     * @param id 主线站点间里程实测数据测试主键
     * @return 结果
     */
    @Override
    public int deleteRoadSectionDistanceTestById(Long id)
    {
        return roadSectionDistanceTestMapper.deleteRoadSectionDistanceTestById(id);
    }

    /**
     * 是否存在子节点
     * 
     * @param id 节点ID
     * @return 结果 true 存在 false 不存在
     */
    @Override
    public boolean hasChildById(Long id)
    {
        int result = roadSectionDistanceTestMapper.hasChildById(id);
        return result > 0;
    }
}
